charset="UTF-8";
$(function() {
    var count = 0;
    $("#exm").addClass("m_active");
        $("#back").click(function() {
            history.back();
        });
        $.ajax ({
            type: "get",
            url: "exam/getCount.action",
            success: function(msg) {
                count = msg - 0;
                console.log(msg);
                $("input[name='questionQuantity']").attr("placeholder", "max "+msg);
            }
        })
         $(".xs_put").blur(function() {
            var value = $(this).val();
            if (value < 0) {
                $(this).val(1);
            }
        });
        $("input[name='questionQuantity']").blur(function() {
            var value = $(this).val() - 0;
            if (value > count) {
                $(this).val(count);
            }
        });
        $(".ride").blur(function() {
            var count = $("input[name='questionQuantity']").val() - 0;
            var point = $("input[name='singleScore']").val() - 0;
            $("#cul").val(count * point);
        });
        var date = new Date();
        var month = date.getMonth() + 1;
        var day = date.getDate();
        day = day < 10 ? "0" + day : day;
        month = month < 10 ? "0" + month : month;
        var now = date.getFullYear() + "-" + month + "-" + day;
        $("input[name='date']").attr("min", now);
})